Relay device

ABSTRACT

A relay device is one of relay devices each including (i) a common port connected to a terminal and (ii) two ring ports connected to other relay devices via communication lines. Upon receiving via the common port a frame whose destination is a terminal connected to a different relay device under one of the communication lines being abnormal, the relay device transmits the frame via both (i) one of the ring ports bypassing the abnormal communication line and (ii) a communication bus. In contrast, upon receiving a frame, whose destination is a terminal connected with the relay device, via one of the ring ports and a frame, whose destination is the terminal connected with the relay device, via the communication bus, the relay device determines whether the frames match. If the frames match, the relay device transfers the matched frame to the terminal via the common port.

CROSS REFERENCE RELATED APPLICATION

The present application claims the benefit of priority from JapanesePatent Application No. 2019-037686 filed on Mar. 1, 2019. The entiredisclosure of the above application is incorporated herein by reference.

TECHNICAL FIELD

The present disclosure relates to a relay device included in acommunication system.

BACKGROUND

For example, a plurality of relay devices are connected in a ring shapein Ethernet, to form a ring topology. “Ethernet” is a registeredtrademark.

In a ring topology, a ring-shaped network is configured by a pluralityof relay devices and a plurality of communication lines connecting theplurality of relay devices. Each relay device includes a plurality ofports, which include common ports (i.e., unspecific ports) and two ringports (i.e., specific ports) for ring connection. The ring-shapednetwork is thus capable of making one round of a frame via twocommunication paths formed between the relay devices. That is, suppose acase where a frame is transmitted via each of the ring ports included inone of the relay devices to a terminal connected to the common portincluded in different one of the relay devices; then, the transmittedframe is input to each of the ring ports in the different one of therelay devices. This also signifies that there are two communicationpaths between a terminal connected to a common port in any relay device(one of the relay devices) and a terminal connected to a common port ofanother relay device (different one of the relay devices).

SUMMARY

According to an example of the present disclosure, a relay device isprovided as one of a plurality of relay devices each including (i) acommon port connected to a terminal and (ii) two ring ports connected toother relay devices via a plurality of communication lines to form aring-shaped network as a first network. Upon receiving via the commonport a frame whose destination is a terminal connected to a differentrelay device under one of the plurality of communication lines beingabnormal, the relay device transmits the frame via both (i) the firstnetwork using one of the ring ports bypassing the abnormal communicationline and (ii) a second network using a communication bus different fromthe plurality of communication lines. In contrast, suppose a case wherethe relay device receives via one of the ring ports a frame whosedestination is a terminal connected with the relay device and furtherreceives via the communication bus a frame whose destination is theterminal connected with the relay device. In such a case, the relaydevice determines whether the frames match each other. If the framesmatch, the relay device transfers the matched frame to the terminal viathe common port.

BRIEF DESCRIPTION OF DRAWINGS

The objects, features, and advantages of the present disclosure willbecome more apparent from the following detailed description made withreference to the accompanying drawings. In the drawings:

FIG. 1 is a diagram illustrating a configuration of a communicationsystem according to an embodiment;

FIG. 2 is an explanatory diagram showing a configuration of an Ethernetframe;

FIG. 3 is a flowchart showing a first transfer control process;

FIG. 4 is a flowchart showing a second transfer control process;

FIG. 5 is a flowchart showing a first abnormal-time process; and

FIG. 6 is a flowchart showing a second abnormal-time process.

DETAILED DESCRIPTION

Hereinafter, an embodiment of the present disclosure will be describedwith reference to the drawings.

1. Configuration

A communication system 1 of the embodiment shown in FIG. 1 includes ECUs11 to 22 and communication lines 31 to 42 mounted on a vehicle. ECU isan abbreviation for “Electronic Control Unit”.

Of the ECUs 11 to 22, the four ECUs 11 to 14 function as Ethernet relaydevices that relay communication between the ECUs 15 to 22 ascommunication terminals. Therefore, hereinafter, the ECUs 11 to 14 maybe also referred to as relay ECUs 11 to 14.

Each of the relay ECUs 11 to 14 includes (i) a switch 51, (ii) aplurality of ports P1 to P4, (iii) a communication control circuit 73 asan Ethernet controller or a first controller, (iv) a computation circuitas a CAN controller or a second controller, and (v) a bus interface 91connected with a communication bus 79. Here, “controller” may be alsoreferred to as “control circuit” or “processor”. Note that the firstcontroller and the second controller may be provided not only to beseparate from each other but also to be integrated to each other;further, each or one of the first controller and the second controllermay be provided as more than one controller. Thus, the first controllerand the second controller may be provided as one or more controllers.

Each controller may provide a plurality of functions, while eachcontroller may include a plurality of modules to provide the respectivefunctions. Here, “module” may be also referred to as “section”.

Further, an individual module in a controller or an individualcontroller may be configured by (i) a central processing unit (CPU)along with memory storing instructions executed by the CPU or (ii)hardware circuitry such as an integrated circuit or a hard-wired logiccircuit with no CPU, or (iii) combination of the hardware circuitry andthe CPU along with memory.

As an example of the present embodiment, as shown in FIG. 1, in each ofthe relay ECUs 11 to 14, the switch 51 serving as a relay processingunit is connected with the ports P1 to P4 for performing relaycommunication according to Ethernet standard. Note that, as anotherexample, the ports P1 to P4 may be provided as being included in theswitch 51.

Further, as an example of the present embodiment, the computationcircuit as the second controller and the bus interface 91 are providedas being included in a microcomputer 61. Although not illustrated, themicrocomputer 61 further includes a CPU, a ROM, and a RAM. In the relayECUs 11 to 14, the microcomputer 61 and the switch 51 are connected viaa communication link.

The number of relay ECUs 11 to 14 is four in this example, but may beother than four. The number of ports is not limited to four and may beother than four.

As an example of the present embodiment, the switch 51 is configured toinclude the communication control circuit 73 as the first controllerthat performs each process including a relay process according to theEthernet standard. As an example, the communication control circuit 73(i.e., first controller) may be configured by (i) an integrated circuit,or (ii) a microcomputer, or (iii) combination of the integrated circuitand the microcomputer. The operations of the switch 51 are realized bythe communication control circuit 73.

In the communication system 1, the port P1 of the relay ECU 11 and theport P1 of the relay ECU 12 are connected by a communication line 31,and the port P2 of the relay ECU 12 and the port P1 of the relay ECU 13are connected by a communication line 32. Furthermore, the port P2 ofthe relay ECU 13 and the port P2 of the relay ECU 14 are connected by acommunication line 33, and the port P1 of the relay ECU 14 and the portP2 of the relay ECU 11 are connected by a communication line 34.

That is, the relay ECUs 11 to 14 are connected in a ring shape byconnecting the ports P1 and P2 of each relay ECU to the ports P1 and P2of the other relay ECUs via the communication lines 31 to 34. For thisreason, the relay ECUs 11 to 14 and the communication lines 31 to 34form a ring-shaped network that can make one round of the frame. Thering shape is also a loop shape.

The ECUs 15 and 16 are connected to the ports P3 and P4 of the relay ECU11 via communication lines 35 and 36, respectively. The ECUs 17 and 18are connected to the ports P3 and P4 of the relay ECU 12 viacommunication lines 37 and 38, respectively. The ECUs 19 and 20 areconnected to the ports P3 and P4 of the relay ECU 13 via communicationlines 39 and 40, respectively. The ECUs 21 and 22 are connected to theports P3 and P4 of the relay ECU 14 via communication lines 41 and 42,respectively. That is, among the ports P1 to P4 of the relay ECUs 11 to14, the ECUs 15 to 22 as communication terminals are connected to theports P3 and P4 that are not used for ring connection.

The communication paths between the relay ECUs 11 to 14 connected in aring shape by the communication lines 31 to 34 include two communicationpaths. For instance, if the relay ECU 11 is a starting point, thecommunication paths include (i) a counterclockwise communication pathwhich has the direction to the relay ECU 12; and (ii) a clockwisecommunication path which has the direction to the relay ECU 14. Thesetwo communication paths can function as two communication paths or tworoutes for communication between (i) one of the ECUs 15 to 22 connectedto one of the relay ECUs 11 to 14 and (ii) different one of the ECUs 15to 22 connected to different one of the relay ECUs 11 to 14.

Hereinafter, the communication lines 31 to 34 may be also referred to asring communication lines. Of the ports P1 to P4, the ports P1 and P2used for ring connection are also referred to as ring ports or specificports. Ports that are not ring ports, that is, ports P3 and P4 that arenot used for ring connection are also referred to as common ports (i.e.,unspecific ports).

The frame communicated between the ports P1 to P4 of the relay ECUs 11to 14 is an Ethernet frame with a VLAN (that is, Virtual Local AreaNetwork) tag as shown in FIG. 2, for example. The Ethernet frameincludes areas of a preamble, a destination MAC address, a transmissionsource MAC address, a VLAN tag, a type, data, and FCS (that is, FrameCheck Sequence). The destination MAC address is a MAC address of theframe destination device, and the transmission source MAC address is theMAC address of the frame source device.

Also, TCI (that is, Tag Control Information) is arranged in the lattertwo bytes of the VLAN tag area. The TCI includes a 3-bit PCP (that is,Priority Code Point), a 1-bit CFI (that is, Canonical Format Indicator),and a 12-bit VID (that is, VLAN Identifier).

PCP is 3-bit information that specifies the priority of a frame definedin the “IEEE802.1p” standard, and is set to any value from 0 to 7. Inthe present embodiment, for example, PCP is used as information onindicating a high importance level for determining a high importancelevel of a frame.

In other words, the QoS rank value of the VLAN tag may be used asinformation on indicating a high importance level. QoS is anabbreviation for “Quality of Service”.

The switch 51 of each of the relay ECUs 11 to 14 includes a memory 74.The memory 74 may be, for example, a volatile memory or a rewritablenonvolatile memory. The memory 74 stores at least a MAC address table 75and an ID table 77.

In the MAC address table 75 in each relay ECU 11 to 14, for each port inthe relay ECU, a MAC address of the device connected to the port isregistered. For example, in the MAC address table 75 in the relay ECU11, the MAC address of the ECU 15 is registered for the common port P3.The MAC address of the ECU 16 is registered for the common port P4. Foreach of the ring ports P1 and P2, the MAC addresses of the ECUs 17 to 22connected to the common ports P3 and P4 of the other relay ECUs 12 to 14are registered. This is because the ECUs 17 to 22 are connectedindividually up to the ring ports P1 and P2 of the relay ECU 11 viaother relay ECUs 12 to 14. Registration of the MAC address in the MACaddress table 75 is performed by a MAC address learning functionprovided in the switch 51, for example. That is, when the switch 51receives a frame via any of the ports P1 to P4, the switch 51 registersthe port number of the port that received the frame and the transmissionsource MAC address included in the received frame, to be associated witheach other in the MAC address table 71.

Then, the switch 51 of each of the relay ECUs 11 to 14 performs thefollowing process as a relay process in Ethernet, for example. Inresponse to receiving a frame (hereinafter referred to as “receivedframe”) via any of the ports P1 to P4, the switch 51 determines thetransfer destination port of the received frame based on the destinationMAC address in the received frame and the MAC address table 75.Specifically, the MAC address table 75 is searched for the same MACaddress as the destination MAC address. If there is a corresponding MACaddress, the port where the searched MAC address is registered in theMAC address table 75 is determined as the transfer destination port.Then, the switch 51 transmits the received frame via the port determinedas the transfer destination port.

Suppose a case where in the communication system 1, a frame istransmitted from one of the relay ECUs 11 to 14 via the ring ports P1and P2; the frame has the destination corresponding to a communicationterminal connected to the other relay ECU via the common ports P3 and P4of the other relay ECU. In such a case, the frame is then input to theother relay ECU via each of the ring ports P1 and P2 in the other relayECU.

For example, it is assumed that the ECU 15 connected to the relay ECU 11transmits a frame (hereinafter referred to as a frame f15-19) destinedfor the ECU 19 connected to the relay ECU 13. The frame f15-19 includesthe MAC address of the ECU 15 as the transmission source MAC address,and includes the MAC address of the ECU 19 as the destination MACaddress.

In this case, the switch 51 of the relay ECU 11 receives the framef15-19 via the port P3. When the switch 51 of the relay ECU 11 transmitsthe received frame f15-19 via the ring port P1, the frame f15-19 ispassed through the relay ECU 12 and is input to the ring port P1 of therelay ECU 13. This is because the switch 51 of the relay ECU 12 receivesthe frame f15-19, which is transmitted from the switch 51 of the relayECU 11, via the ring port P1, and transmits it via the ring port P2 bythe relay process.

When the switch 51 of the relay ECU 11 transmits the received framef15-19 via the ring port P2, the frame f15-19 is passed through therelay ECU 14 and is input to the ring port P2 of the relay ECU 13. Thisis because the switch 51 of the relay ECU 14 receives the frame f15-19,which is transmitted from the switch 51 of the relay ECU 11, via thering port P1, and transmits it via the ring port P2 by the relayprocess.

Although not specifically shown, the switch 51 includes a non-volatilememory, and the non-volatile memory stores an ID (that is,identification) of the relay ECU 11 to 14 including the switch 51. Thatis, the ID corresponds to identification information for identifying anindividual one of the relay ECUs 11 to 14. Since the switch 51 isdistinguished for each relay ECU 11 to 14, the ID may be an ID of theswitch 51 for each relay ECU 11 to 14.

As described above, in each relay ECU 11 to 14, the memory 74 of theswitch 51 stores or records the ID table 77. In the ID table 77, the IDsof the other relay ECUs connected in a ring shape are recorded to beassociated with the connection order of the other relay ECUs as viewedfrom at least one of the ports P1 and P2 of the relay ECU. That is, theID table 77 of a first relay ECU of any one of the relay ECUs 11 to 14records the information or contents indicating the relation between theIDs of the other relay ECUs and the connection order of the other relayECUs when viewed from each port P1, P2 of the first relay ECU.

Further, the relay ECUs 11 to 14 are connected to each other via thecommunication bus 79 having a protocol different from that of Ethernet.The microcomputers 61 of the relay ECUs 11 to 14 can communicate witheach other via the communication bus 79 by using the bus interface so asto connect with the communication bus 79. In this embodiment, thecommunication protocol via the communication bus 79 is, for example,CAN, but may be other than CAN. Note that CAN is an abbreviation for“Controller Area Network”. CAN is a registered trademark.

2. Function for Detecting Abnormality in Ring Communication Line

The communication control circuit 73 in the switch 51 of each of therelay ECUs 11 to 14 also functions as an abnormality detection modulethat detects an abnormal ring communication line 31 to 34 or acommunication line abnormality state. In other words, the switch 51includes the abnormality detection module.

Here, the operation content of the abnormality detection module (i.e.,the communication control circuit 73) will be described as beingexecuted by the switch 51. When the switches 51 of the relay ECUs 11 to14 are particularly distinguished, the switch 51 of the relay ECU 11 isdescribed as a switch 51_11; the switch 51 of the relay ECU 12 isdescribed as a switch 51_12; the switch 51 of the relay ECU 13 isdescribed as a switch 51_13; the switch of the relay ECU 14 is describedas a switch 51_14.

In order to detect the abnormal ring communication lines 31 to 34, oneof the switches 51 of the relay ECUs 11 to 14 functions as a masterswitch, and the other switches function as slave switches. Here, it isassumed that the switch 51_11 is a master switch. In addition, anabnormality detection frame and an abnormality notification frame, whichwill be described later, are frames transferred between the ring portsP1 and P2 of the relay ECUs 11 to 14, in other words, frames that flowthrough a ring-shaped network.

The switch 51_11 as a master switch performs the following processes<1>, <2>, and <5>. Further, the switches 51_12 to 51_14 as slaveswitches perform the following processes <3>, <4>, and <5>. In otherwords, the abnormality detection module (i.e., the communication controlcircuit 73) of the switch 51_11 performs the following processes <1>,<2>, <5>, and the abnormality detection module (i.e., the communicationcontrol circuit 73) of the switches 51_12 to 51_14 performs thefollowing processes <3>, <4>, <5>. The processes <1> to <5> below aredescribed in Patent literature 2 (i.e., US 2017/0041161 A1). Here, US2017/0041161 A1 is incorporated herein by reference.

<1> The switch 51_11 transmits an abnormality detection frame via one ofthe ring ports P1 and P2 every predetermined time Ti. Here, it isassumed that an abnormality detection frame is transmitted via the portP1. The abnormality detection frame is, for example, a frame whosedestination MAC address is a code indicating that it is an abnormalitydetection frame.

It should be noted that the abnormality detection frame transmitted viathe port P1 from the relay ECU 11 causes the switch 51_12 to 51_14 toperform the process <3> to be described later so that the abnormalitydetection frame goes around the ring-shape network once and returns tothe port P2 of the relay ECU 11. In addition, a fixed time Ti, which isthe transmission interval of the abnormality detection frame, is greaterthan the time required for the abnormality detection frame to go aroundthe ring-shape network once.

<2> The switch 51_11 determines whether either the abnormality detectionframe or the abnormality notification frame transmitted from anotherswitch is received via the port P2 within a predetermined time T1 sincethe time of transmission of the abnormality detection frame. If neitherthe abnormality detection frame nor the abnormality notification frameis received within the predetermined time T1, the master notificationprocess is performed (see <<Master notification process>> described tobe later).

Note that the predetermined time T1 is greater than the time requiredfor the abnormality detection frame to go around the ring-shapedcommunication path and return to the switch 51_11. In the switch 51_11,the predetermined time T1 (i.e., the period of time) since the time oftransmission of the abnormality detection frame is defined as follows.That is, within the predetermined time, the switch 51_11 should receivean abnormality detection frame or an abnormality notification frametransmitted from a switch (hereinafter referred to as a previous switch)immediately before the switch 51_11 (i.e., located to be immediatelyupstream of the switch 51_11) in the circulation direction of theabnormality detection frame.

<<Master Notification Process>>

The master notification process referred to in the above is described asfollows. That is, the switch 51_11 identifies the relay ECU (that is,the relay ECU 14) that is connected first when viewed from the port P2,from the ID table 77 of the switch 51_11. The identification of therelay ECU is realized by specifying the ID of the relay ECU or the ID ofthe switch. Then, the switch 51_11 detects that an abnormality hasoccurred in the ring communication line 34 between the identified relayECU 14 and the relay ECU 11. Further, in order to notify the otherswitches 51 of this abnormality location, the switch 51_11 transmits anabnormality notification frame including the ID of the relay ECU 11 viathe port P1. The abnormality notification frame is, for example, a framewhose destination MAC address is a code indicating that it is anabnormality notification frame.

<3> When the switches 51_12 to 51_14 receive the abnormality detectionframe via one of the ring ports P1 and P2, the switches 51_12 to 51_14transmit the received abnormality detection frame via one of the portsP1 and P2 that is different from the one via which the abnormalitydetection frame is received (hereinafter, upstream ring port).

<4> The switches 51_12 to 51_14 determine whether either the abnormalitydetection frame or the abnormality notification frame transmitted byanother switch is received via the upstream ring port of the ring portsP1 and P2 within a predetermined time T2 since the time of reception ofthe abnormality detection frame. If it is determined that neither theabnormality detection frame nor the abnormality notification frame isreceived within the predetermined time T2, the slave notificationprocess which will be described later, is performed.

The predetermined time T2 is greater than the predetermined time Ti thatis the transmission interval of the abnormality detection frame. In theswitches 51_12 to 51_14, the predetermined time T2 since the time of thereception of the abnormality detection frame is defined as follows. Thatis, within the predetermined time T2, the switches 51_12 to 51_14 shouldreceive the abnormality detection frame or abnormality notificationframe transmitted from the previous switch.

<<Slave Notification Processing>>

The slave notification process referred to in the above is described asfollows. Now, for explanation, one of the switches 51_12 to 51_14 isreferred to as a slave switch and one of the relay ECU 12 to 14including the slave switch is referred to as a slave relay ECU. Theslave switch specifies the relay ECU that is connected first when viewedfrom the upstream ring port of the slave relay ECU, that is, the relayECU (hereinafter referred to as the previous relay ECU) provided withthe previous switch from the ID table 77 of the slave switch. Then, theslave switch detects that an abnormality has occurred in the ringcommunication line between the identified previous relay ECU and theslave relay ECU among the ring communication lines 31 to 34.Furthermore, in order to notify other switches of this abnormallocation, an abnormality notification frame including the ID of theslave relay ECU is transmitted via one of the ports P1 and P2 that isdifferent from the upstream ring port.

<5> Now, for explanation, one of the switches 51_11 to 51_14 is referredto as a subject switch and one of the relay ECU 11 to 14 including thesubject switch is referred to as a subject relay ECU. When anabnormality notification frame transmitted by another switch is receivedvia one of the ports P1 and P2, the subject switch transmits thereceived abnormality notification frame via the other one of the portsP1 and P2 that is different from the one that received the abnormalitynotification frame. Further, the subject switch identifies a previousrelay ECU from the ID table 77 of the subject switch. Here, the previousrelay ECU is a relay ECU connected immediately before the relay ECUwhose ID is included in the abnormality notification frame when viewedfrom the one of the ports P1 and P2 via which the abnormalitynotification frame is received. Then, the subject switch detects that anabnormality has occurred in the ring communication line of the ringcommunication lines 31 to 34 between the identified previous relay ECUand the relay ECU whose ID is included in the abnormality notificationframe.

3. Transfer Control Process Performed by Switch

Next, among the processes performed by the switches 51 of the relay ECUs11 to 14, a first transfer control process will be described withreference to FIG. 3, and a second transfer control process will bedescribed with reference to FIG. 4.

In the following description, ECUs connected with the common ports P3and P4 are referred to as follows. That is, ECUs connected with thecommon ports P3 and P4 of each relay ECUs 11 to 14 are referred to asown relay ECU connection terminals or inner connection terminals. Incontrast, ECUs connected with the common ports P3 and P4 of the otherrelay ECUs (i.e., different relay ECUs) as viewed from each relay ECU 11to 14 are referred to as different relay ECU connection terminals orouter connection terminals. For example, the inner connection terminals(i.e., the own relay ECU connection terminals) as viewed from the relayECU 11 (i.e., the switch 51_11) are the ECUs 15 and 16. For example, theouter connection terminals (i.e., the different relay ECU connectionterminals) as viewed from the relay ECU 11 (i.e., the switch 51_11) arethe ECUs 17 to 22.

The following will describe processes in the flowcharts in FIGS. 3 to 5executed by the first controller serving as the communication controlcircuit 73 and the second controller serving as the computation circuitor each microcomputer 61. Each flowchart includes steps (e.g., S110),one or several steps may be executed by a corresponding module (i.e.,section) included in the first controller or the second controller.

<First Transfer Control Process>

As shown in FIG. 3, when the switch 51 of one of the relay ECUs 11 to 14receives a frame destined for a different relay ECU connection terminal(i.e., a frame destined for an outer connection terminal) via one of thecommon ports P3 and P4 in S100, the switch 51 proceeds to S110. That is,if the destination MAC address in the frame received from one of thecommon ports P3 and P4 is registered for the ring ports P1 and P2 in theMAC address table 75 of the switch 51, the switch 51 proceeds to S110.

In S110, the switch 51 determines whether or not an abnormality of afirst network is detected. The first network is a ring-shaped network.In S110, specifically, it is determined whether any abnormality of thering communication lines 31 to 34 is detected by the function of theabnormality detection module (i.e., the communication control circuit73) of the switch 51.

If determining in S110 that an abnormality in the first network has notbeen detected, the switch 51 proceeds to S120. In S120, the switch 51determines whether or not the received frame indicates a high importancelevel. For example, the switch 51 determines whether or not the PCPvalue in the received frame is a predetermined importance indicationvalue. If the PCP value is the importance indication value, the switch51 determines that the received frame indicates a high importance level.There may be one or more importance indication values. For example, theswitch 51 may determine that the received frame indicates a highimportance level when the PCP value is equal to or greater than apredetermined threshold value or equal to or less than the thresholdvalue. The PCP value may be set in the ECU that is the frametransmission source. Note that a frame indicating a high importancelevel may be, for example, a frame including data, which indicates orhave a high importance level as data in the data area. In this case, itcan be said that in S120, it is determined whether the data included inthe received frame indicates a high importance level.

If determining in S120 that the received frame indicates a highimportance level, the switch 51 proceeds to S130. In S130, the switch 51transmits the received frame via each of the ring ports P1 and P2. Ifdetermining that the received frame does not indicate a high importancelevel in S120, the switch 51 proceeds to S140. In S140, the switch 51transmits the received frame via one of the ring ports P1 and P2. Forexample, such one of the ring ports P1 and P2 that transmits a frame inS140 may be a predetermined one of the ring ports P1 and P2.Alternatively, the one of the ring ports P1 and P2 that transmits aframe in S140 may be selected so as to provide the shortest route up tothe destination ECU, i.e., the route has the smallest number of relayECUs that relay the frame to the destination ECU.

If determining in S110 that an abnormality of the first network has beendetected, the switch 51 proceeds to S150. In S150, the switch 51performs a first abnormal-time process described later.

<Second Transfer Control Process>

In contrast, as shown in FIG. 4, when the switch 51 of the relay ECUs 11to 14 receives a frame destined for the inner connection terminal (i.e.,the own relay ECU connection terminal) via one of the ring ports P1 andP2 in S200, the switch 51 proceeds to S210. Here, just for explanation,the frame, which is received via one of the ring ports P1 and P2 anddestined for the inner connection terminal, may be also referred to as asubject frame. That is, if the destination MAC address in the framereceived via the one of the ring ports P1 and P2 is registered for thecommon ports P3 and P4 in the MAC address table 75 of the switch 51, theswitch 51 proceeds to S210.

In S210, the switch 51 determines whether an abnormality in the firstnetwork has been detected, as in S110 of FIG. 3. If the switch 51determines in S210 that an abnormality in the first network has not beendetected, the switch 51 proceeds to S220. In S220, the switch 51determines whether the received frame indicates a high importance levelaccording to the same rule as S120 in FIG. 3.

If determining that the received frame does not indicate a highimportance level in S220, the switch 51 proceeds to S230. In S230, theswitch 51 transfers the received frame to the destination. That is, inS230, the received frame is transmitted via the common port to which thedestination ECU of the received frame is connected among the ports P1 toP4.

If determining that the received frame indicates a high importance levelin S220, the switch 51 proceeds to S240. Here, the received frame whichis received via the one of the ring ports P1 and P2 and is determined toindicate a high importance level is referred to as a determinationtarget frame. In S240, the switch 51 determines whether an identicaldestination frame is received via the other one (i.e., different one) ofthe ring ports P1 and P2 within a predetermined time since thedetermination target frame was received via the one of the ring ports P1and P2. Further, the above identical destination frame is a frame havingthe same destination as that of the determination target frame.

If the determination in S240 is affirmative, that is, “YES”, the switch51 proceeds to S250. In S250, the switch 51 determines whether or notthe two frames received respectively via the ring ports P1 and P2 matcheach other (i.e., the switch 51 executes a match determination as towhether the two frames received respectively via the ring ports P1 andP2 match each other).

If the determination in S250 is affirmative, the switch 51 proceeds toS260, and transfers the received frame to the destination as in S230.The received frame to be transferred in S260 may be either the framereceived via the ring port P1 or the frame received via the ring portP2. This is because both the frames are determined to be identical toeach other by the determination (i.e., the match determination) in S250.

If the determination in S250 is negative, that is, “NO”, the switch 51proceeds to S270 and discards the frames received respectively via thering ports P1 and P2 without transferring it to the destination.

In S280, the switch 51 notifies the microcomputer of the relay ECUincluding the switch 51 (i.e., host relay ECU), for example, that theframe has been discarded. The microcomputer that has received thenotification notifies the other relay ECUs (i.e., different relay ECUs)through the communication bus 79 of the discard of the frame (i.e., thatthe frame has been discarded). In this case, the different relay ECUthat has received the notification may notify the ECU serving as thetransmission source of the discarded frame of the discard of the frame.The transmission source ECU that is notified of the discard of the framecan implement some fail-safe. In S280, the switch 51 may perform aprocess of notifying the ECU as the transmission source of the discardedframe of the discard of the frame by using the ring-shaped network.

On the other hand, even when the determination in S240 is negative, theswitch 51 proceeds to S270, and discards the frame (i.e., thedetermination target frame) already received via one of the ring portsP1 and P2. This is because frames cannot be received via both the ringports P1 and P2 even after a fixed time, and the determination in S250cannot be performed. Also in this case, in S280, the switch 51 performsprocessing for notifying of the discard of the frame.

If the switch 51 determines in S210 that an abnormality in the firstnetwork has been detected, the switch 51 proceeds to S290 and performs asecond abnormal-time process described later.

<<First Abnormal-Time Process>>

In S110 of FIG. 3, when the switch 51 determines that an abnormality inthe first network has been detected, the switch 51 proceeds to S150,where the first abnormal-time process is started. Then, with referenceto FIG. 5 illustrating the first abnormal-time process, in S310, theswitch 51 determines whether or not the received frame (i.e., the framedestined for the different relay ECU connection terminal or framedestined for the outer connection terminal) indicates a high importancelevel. This S310 is the same process as S120 of FIG. 3.

If the switch 51 determines in S310 that the received frame does notindicate a high importance level, the switch 51 proceeds to S320, andtransfers the received frame through a detour path of the first network.Such a detour path does not pass through an abnormal ring communicationline among two communication paths up to the different relay ECU towhich the destination ECU is connected in the first network (that is, aring-shaped network). The detour path is the communication path that cantransmit the frame up to the different relay ECU.

Specifically, the switch 51 has the specifying information on connectionrelationship between (i) the common ports P3 and P4 of the relay ECUs 11to 14 and (ii) the ECUs 15 to 22 connected to the common ports P3 and P4of the relay ECUs 11 to 14. Then, in S320, the switch 51 specifies thedifferent relay ECU (hereinafter referred to as the destination relayECU) to which the destination ECU of the received frame is connected viathe ports P3 and P4 from the specifying information on connectionrelationship. Furthermore, the switch 51 finds a detour path whichallows the frame to reach the destination relay ECU without passingthrough the detected abnormal ring communication line, and selects oneof the ring ports P1 and P2 that is connected to the detour path. Thereceived frame is transmitted via the selected ring port.

In S320, the received frame may be transmitted via both the ring portsP1 and P2. This is because the received frame reaches the destinationrelay ECU via the normal one of the two communication paths, that is,the one not including the abnormal ring communication line. In contrast,it is possible to suppress traffic by configuring the received frame tobe transmitted only via one of the ring ports P1 and P2 that isconnected to the detour path. Further, by configuring the received frameto be transmitted via both the ring ports P1 and P2, anotherdetermination can become possible when it is determined that the firstnetwork is abnormal. That is, when frames are received via both the ringports P1 and P2 of the destination relay ECU, it is possible todetermine that the first network has recovered from the abnormal state.

If the switch 51 determines that the received frame indicates a highimportance level in S310, the switch 51 proceeds to S330 and transfersthe received frame through the detour path of the first network as inS320. Transfer is also performed in a second network different from thefirst network.

As in S320, the received frame may be transmitted via both the ringports P1 and P2 in S330. The second network is a communication bus 79 inthis embodiment. In S330, the switch 51 outputs a received frame as arelay target frame to the microcomputer 61, thereby causing themicrocomputer 61 to transmit the received frame to the destination relayECU via the communication bus 79. Specifically, the microcomputer 61stores the received frame input from the switch 51 as a redundant framein the data area in the CAN communication frame (that is, the CANframe). Then, the CAN frame storing the redundant frame (hereinafter,redundant transfer CAN frame) is transmitted to the communication bus79. Further, in the transmitted CAN frame for redundant transfer,information (for example, CANID) capable of specifying the destinationmay be information indicating the destination relay ECU as thedestination.

<<Second Abnormal-Time Process>>

In S210 of FIG. 4, when the switch 51 determines that an abnormality inthe first network has been detected, the switch 51 proceeds to S290,where the second abnormal-time process is started. Then, with referenceto FIG. 6 illustrating the second abnormal-time process, in S410, it isdetermined whether or not the received frame (i.e., the frame destinedfor the inner connection terminal) indicates a high importance level.This S410 is the same process as S220 of FIG. 4. As described above,just for explanation, the frame, which is received via one of the ringports P1 and P2 and destined for the inner connection terminal, may bealso referred to as a subject frame.

If the switch 51 determines that the received frame does not indicate ahigh importance level in S410, the switch 51 proceeds to S420, andtransfers the received frame to the destination as in S230 of FIG. 4.That is, in S420, the received frame is transmitted via the common portto which the destination ECU of the received frame is connected amongthe ports P1 to P4.

If the switch 51 determines that the received frame indicates a highimportance level in S410, the switch 51 proceeds to S430. Then, in S430,the switch 51 waits until the redundant transfer CAN frame transmittedfrom the different relay ECU via the communication bus 79 by the processof S330 in FIG. 5 is received by the microcomputer 61 of the host relayECU. The different relay ECU referred to here is a relay ECU in whichthe ECU that is the transmission source of the frame determined toindicate a high importance level in S410 is connected to the commonports P3 and P4.

Then, in S440, the switch 51 determines whether a redundant transfer CANframe has been received via the communication bus 79 within a fixed timesince the frame determined to indicate a high importance level in S410is received via one of the ring ports P1 and P2. Note that the processesof S430 and S440 are actually performed in parallel.

If the determination in S440 is affirmative, the switch 51 proceeds toS450, and extracts the above-described redundant frame from theredundant transfer CAN frame received from the communication bus 79 bythe microcomputer 61. Then, it is determined whether or not the framereceived via one of the ring ports P1 and P2 matches the redundant frameextracted from the redundant transfer CAN frame.

The redundant frame extracted from the redundant transfer CAN frame is arelay target frame transmitted via the communication bus 79 by anotherrelay ECU. Further, the process of S450 corresponds to a matchdetermination. The relay ECU that transmits the redundant frame maydivide the redundant frame into a plurality of parts, store the dividedparts in a plurality of CAN frames, and transmit them via thecommunication bus 79. In this case, the relay ECU on the receiving sideof the redundant frame may restore the redundant frame by connecting therespective divided parts of the redundant frame and stored in aplurality of CAN frames.

If the switch 51 makes an affirmative determination in S450, that is, ifthe received frame via one of the ring ports P1 and P2 matches theredundant frame via the communication bus 79, the switch 51 proceeds toS460. As in S230 of FIG. 4, in S460, the received frame is transferredto the destination. Note that the received frame to be transferred inS460 may be either a received frame via one of the ring ports P1 and P2or a redundant frame via the communication bus 79. This is because boththe frames are determined to be identical to each other by thedetermination in S450.

If the determination in S450 is negative, the switch 51 proceeds to S470and discards the received frame via one of the ring ports P1 and P2 andthe redundant frame via the communication bus 79 without transferringthem to the destination. This is because an error may occur in one ofthe frames.

Then, in next S480, the switch 51 notifies the microcomputer in the hostrelay ECU, for example, of the discard of the frame (i.e., of the factthat the frames have been discarded), as in S280 of FIG. 4. Themicrocomputer that has received the notification notifies the differentrelay ECU through the communication bus 79 of the discard of the frame.Also in this case, as in S280 in FIG. 4, the different relay ECU thathas received the notification may notify the ECU as the transmissionsource of the discarded frame of the discard of the frame. Also, inS480, the switch 51 may perform a process of notifying the transmissionsource ECU of the frame via the ring-shaped network that the frame hasbeen discarded.

On the other hand, even if the switch 51 makes a negative determinationin S440, the switch 51 proceeds to S470 and discards the received frame.This is because the CAN frame (i.e., the redundant frame) for redundanttransfer cannot be received via the communication bus 79 even if a fixedtime has elapsed, and the determination in S450 cannot be performed.Also in this case, in S480, the switch 51 performs a process fornotifying of the discard of the frame.

4. Operation Example

In the communication system 1, for example, as in the above-describedexample, it is assumed that the ECU 15 transmits a frame f15-19 destinedfor the ECU 19. The frame f15-19 is assumed to be a frame determined toindicate a high importance level by the switch 51 (that is, a highimportance frame).

First, the following will describe a case where the ring-shaped networkis normal, that is, a case where there is no abnormality in the ringcommunication lines 31 to 34. The switch 51_11 that has received theframe f15-19 from the ECU 15 via the common port P3 transmits the framef15-19 via each of the ring ports P1 and P2 in S130 of FIG. 3. Then, thetransmitted frame f15-19 is input to each of the ring ports P1 and P2 ofthe switch 51_13 through two communication paths in the ring-shapednetwork.

Therefore, the switch 51_13 receives the frame f15-19 via each of thering ports P1 and P2. If it is determined in S250 of FIG. 4 that the twoframes f15-19 received via each of the ring ports P1 and P2 match eachother, the received frame f15-19 is transmitted via the common port P3to which the destination ECU 19 is connected in S260 of FIG. 4.

If the switch 51_13 determines in S250 of FIG. 4 that the frames f15-19received respectively via the ring ports P1 and P2 do not match, thereliability of the received frame f15-19 is determined to be low. Then,the received two frames f15-19 are discarded in S270 of FIG. 4.

The switch 51_13 receives the frame f15-19 via one of the ring ports P1and P2. If failing to receive the frame f15-19 via different one of thering ports P1 and P2 within a fixed time since the frame f15-19 wasreceived via the one of the ring ports P1 and P2, the switch 51_13discards the received frame f15-19 in S270 of FIG. 4.

Next, the following will describe, as an example of when an abnormalityoccurs somewhere in the ring-shaped network, a case where an abnormalityoccurs in the ring communication line 32. The switch 51_11 that hasreceived the frame f15-19 from the ECU 15 via the common port P3determines “YES” in S110 of FIG. 3, and performs the process of FIG. 5(that is, the first abnormal-time process).

Then, in S330 of FIG. 5, the switch 51_11 selects one (that is, P2) ofthe ring ports P1 and P2 that can transmit the frame up to the relay ECU13 without passing through the abnormal ring communication line 32. Theframe f15-19 is then transmitted via the ring port P2. Further, theswitch 51_11 transmits the frame f15-19 to the relay ECU 13 via thecommunication bus 79 in S330 of FIG. 5.

Then, in the relay ECU 13, the switch 51_13 receives the frame f15-19via one (that is, P2) of the ring ports P1 and P2, determines “YES” inS210 of FIG. 4, and performs the process of FIG. 6 (That is, the secondabnormal-time process).

Then, the switch 51_13 receives the frame f15-19 as a redundant framevia the communication bus 79 through the microcomputer 61 of the relayECU 13 in S430 of FIG. 6. Further, in S450 in FIG. 6, the switch 51_13determines whether or not the two frames f15-19 received respectivelyvia the ring port P2 and the communication bus 79 match each other. Ifthe two frames match, the frame f15-19 is transmitted via the commonport P3 in S460 of FIG. 6.

If the switch 51_13 determines in S450 of FIG. 6 that the two framesf15-19 do not match, the switch 51_13 determines that the reliability ofthe received frame f15-19 is low. Then, the received two frames f15-19are discarded in S470 of FIG. 6.

The switch 51_13 receives the frame f15-19 via the ring port P2. Whenthe frame f15-19 cannot be received from the communication bus 79 withina fixed time since the frame f15-19 was received via the ring port P2,the received frame f15-19 is also discarded in S470 of FIG. 6.

5. Effects

According to the relay ECUs 11 to 14 of the above-described embodiment,when the ring-shaped network is normal, frames each indicating a highimportance level are transmitted and received respectively via the tworing ports P1 and P2, and are enabled to be transmitted through twocommunication paths. When the frames transmitted through the twocommunication paths match, the frames are transmitted to the destinationECU. Therefore, communication reliability can be improved. In the aboveoperation example, the reliability of communication from the ECU 15 tothe ECU 19 can be improved.

Further, even if an abnormality occurs in any of the ring communicationlines 31 to 34 forming the ring-shaped network, a frame indicating ahigh importance level is enabled to be transmitted via two routes or twocommunication paths corresponding to two of (i) the normal one of thetwo communication paths in the ring-shaped network (i.e., a detour path)and (ii) the communication bus 79. When the frames transmitted throughthe two routes match, the frame is transmitted to the destination ECU.Therefore, even when an abnormality occurs in any of the ringcommunication lines 31 to 34, the communication reliability can beimproved.

Further, regardless of the presence or absence of an abnormality in anyone of the ring communication lines 31 to 34, a frame not indicating ahigh importance level is transmitted through one route (i.e., onecommunication path in the ring-shaped network). For this reason,compared with the configuration which uses two routes for transmissionof all the frames, the traffic of a ring-shaped network or thecommunication bus 79 can be reduced.

In addition, if the relay ECUs 11 to 14 determine “NO” in S240 of FIG.4, the frame already received via one of the ring ports P1 and P2 isdiscarded. Similarly, when it is determined “NO” in S440 of FIG. 6, aframe already received via one of the ring ports P1 and P2 is discarded.For this reason, it is possible to prevent waiting for a frame when oneof the two frames does not reach due to some abnormality. Further, it ispossible to prevent the transmission to the destination relay ECU of thehigh importance frame for which reliability confirmation has not beenperformed through the match determination. Further, anotherconfiguration may be provided. For instance, if “NO” is determined inS240 of FIG. 4 or if “NO” is determined in S440 of FIG. 6, the receivedframe may not be transmitted to the destination ECU, but be stored for apredetermined period.

In the present embodiment, the switch 51 (i.e., the first controller)and the microcomputer 61 (i.e., the second controller) function as eachof a redundant transmission module or section and an abnormal-timetransfer module or section. S310 to S330 in FIG. 5 correspond to theprocessing as a redundant transmission module or section. S410 to S470in FIG. 6 correspond to the processing as an abnormal-time transfermodule or section.

6. Other Embodiments

While the embodiment of the present disclosure has been described, thepresent disclosure is not limited to the embodiment described above andcan be modified in various manners.

Another different configuration may be provided as follows. For example,the relay ECUs 11 to 14 may transmit frames that do not indicate a highimportance level through the two communication paths, as well as theframes indicating a high importance level, and determine whether the twoframes match. In this case, S120 and S140 in FIGS. 3, S220 and S230 inFIGS. 4, S310 and S320 in FIG. 5, and S410 and S420 in FIG. 6 may bedeleted. Further, the abnormality detection module (i.e., thecommunication control circuit 73) may be configured to detect theabnormal ring communication lines 31 to 34 by a process different fromthe processes <1> to <5> described above.

Further, yet another different configuration may be provided as follows.For example, the relay ECUs 11 to 14 may measure the continuous numberof times or the continuous time determined as “NO” in S440 of FIG. 6. Ifthis measured value is equal to or greater than a predetermined value,the switch 51 proceeds to S460 instead of S470, where a received framemay be transferred via one of the ring ports P1 and P2 to thedestination ECU. According to such a configuration, even when anabnormality occurs in the communication bus 79 and a redundant framecannot be received via the communication bus 79, the frame transfer tothe destination ECU can be performed.

Further, another different configuration may be provided as follows. Forexample, the relay ECUs 11 to 14 may embed abnormality information onthe frame, which is transferred to the destination ECU withoutundergoing the match determination. The abnormality informationindicates that the match determination is not executed on the frametransferred to the destination ECU. In other words, the abnormalityinformation indicates that the reliability check is not performed.According to such a configuration, the ECU that has received the framestransferred from the relay ECUs 11 to 14 can recognize that thereliability of the received frames is low based on the abnormalityinformation. For example, the data in the received frame can thereby behandled differently from the normal time. For example, it is possible toselectively use data in a frame in which abnormality information isincluded only for processing with a low reliability rank. Furthermore,another different configuration may be provided as follows. The relayECUs 11 to 14 may embed match determination information on the frametransferred to the destination ECU when a match determination isexecuted between (i) the received frame through a detour path of thefirst network and (ii) the redundant transfer CAN frame (i.e., redundantframe) received through the communication bus 79. The matchdetermination information indicating that the match determination isexecuted between the frame received through the detour path of the firstnetwork and the redundant transfer CAN frame received through thecommunication bus 79 as the second network.

In addition, the relay ECUs 11 to 14 and the method thereof described inthe present disclosure may be each implemented by at least one specialpurpose computer created by configuring a memory and a processorprogrammed to execute one or more particular functions embodied incomputer programs. Alternatively, the relay ECUs 11 to 14 and the methodthereof described in the present disclosure may be each implemented byat least one special purpose computer created by configuring a processorprovided by one or more special purpose hardware logic circuits. Furtheralternatively, the relay ECUs 11 to 14 and the method thereof describedin the present disclosure may be each implemented by at least onespecial purpose computer created by configuring a combination of (i) amemory and a processor programmed to execute one or more particularfunctions and (ii) a processor provided by one or more hardware logiccircuits. That is, the relay ECUs 11 to 14 and the method thereofdescribed in the present disclosure may be each implemented by at leastone special purpose computer created by configuring (i) a memory and aprocessor programmed to execute one or more particular functionsembodied in computer programs, or (ii) a processor provided by one ormore special purpose hardware logic circuits, or (iii) a combination of(a) a memory and a processor programmed to execute one or moreparticular functions and (b) a processor provided by one or morehardware logic circuits. The computer program may be stored in acomputer-readable non-transitory tangible storage medium as instructionsexecuted by the computer. A method of realizing the functions of themodules or sections included in the relay ECU 11 to 14 are notnecessarily required to include software, all functions may beimplemented using one or more hardware circuits.

Multiple functions of one element in the described above embodiment maybe implemented by multiple elements, or one function of one element maybe implemented by multiple elements. Further, multiple functions ofmultiple elements may be implemented by one element, or one functionimplemented by multiple elements may be implemented by one element.Alternatively, a part of the configuration of the above embodiment maybe omitted. At least a part of the configuration of the above embodimentmay be added to or replaced with another configuration of anotherembodiment.

The present disclosure may be realized in various forms in addition tothe relay ECUs 11 to 14 described above, such as a system including therelay ECUs 11 to 14 as components, a program for causing a computer tofunction as the relay ECUs 11 to 14, a non-transitory tangible storagemedium such as semiconductor memory in which the program is stored, or anetwork abnormality detection method.

For reference to further explain features of the present disclosure, thedescription is added as follows.

In a related art, among a plurality of relay devices connected in a ringshape, a relay device receives a frame via the common port in the relaydevice; the frame is destined for a terminal (destination terminal)connected to a common port in different one (i.e., different relaydevice) of the plurality of relay devices. The frame is transmitted viaeach of the two ring ports in the relay device. Then, the differentrelay device to which the destination terminal of the frame is connectedreceives two frames that reach each of the two ring ports in thedifferent relay device via two communication paths. If the two framesmatch each other, the frame is transferred to the destination terminal.Such a configuration can improve a communication reliability.

Further, a technique is known for detecting, in each relay device, acommunication line abnormality state in which an abnormality hasoccurred among a plurality of communication lines connecting a pluralityof relay devices in a ring shape.

As a result of detailed studies, the inventor has found the followingissues. In the above related art, when an abnormality occurs in any of aplurality of communication lines that connect a plurality of relaydevices in a ring shape, the frame eventually arrives at the relaydevice, which the frame destination terminal is connected to, via onlyone of the two communication paths. Therefore, it is not possible toimprove reliability by determining whether two frames match each other.

It is thus desired to provide a relay device that improves thereliability of communication even when an abnormality occurs in any of aplurality of communication lines connecting a plurality of relay devicesin a ring shape.

An aspect of the present disclosure described herein is set forth in thefollowing clauses.

According to an aspect of the present disclosure, a relay device isprovided as follows. The relay device is one of a plurality of relaydevices in a communication system. Each relay device includes aplurality of ports that include a common port and two ring ports. Thecommon port is connected with a terminal. Each of the two ring ports isconnected with one of a plurality of communication lines to connect theplurality of relay devices to each other via the plurality of thecommunication lines to form a ring-shaped network. The plurality ofrelay devices are further connected to each other via a communicationbus other than the plurality of communication lines.

The relay device includes an abnormality detection module which may beimplemented by a first controller, a redundant transmission module whichmay be implemented by the first controller and a second controller, andan abnormal-time transfer module which may be implemented by the firstcontroller and the second controller.

The abnormality detection module is configured to detect a communicationline abnormality state that is a state where an abnormal communicationline is detected among the plurality of communication lines included inthe ring-shaped network.

The redundant transmission module is configured to transmit a firstrelay target frame in response to that the first relay target frame isreceived via the common port included in the relay device under thecommunication line abnormality state. Here, the first relay target frameis destined for a different terminal connected to a different relaydevice that is different one of the plurality of relay devices via adifferent common port included in the different relay device. The firstrelay target frame is transmitted via both of the communication bus andthe ring-shaped network. The ring-shaped network uses either (i) both ofthe two ring ports included in the relay device or (ii) one of the tworing ports included in the relay device via which the first relay targetframe is enabled to be transmitted up to the different relay devicewithout passing through the abnormal communication line under thecommunication line abnormality state.

The abnormal-time transfer module is configured to (i) receive a secondrelay target frame via the communication bus on condition that, underthe communication line abnormality state, a subject frame that is aframe whose destination is the terminal connected via the common portincluded in the relay device is received via one of the two ring portsincluded in the relay device, (ii) execute, upon receiving the secondrelay target frame, a match determination whether to be affirmative ornot affirmative, the match determination being affirmative in responseto that the subject frame received via the one of the two ring portsmatches the second relay target frame received via the communicationbus, (iii) transmit the subject frame received via the one of the tworing ports to the terminal connected via the common port in response tothe match determination being affirmative, and (iv) discard the subjectframe received via the one of the two ring ports and the second relaytarget frame received via the communication bus without transmitting thesubject frame and the second relay target frame via the common port inresponse to the match determination being not affirmative. Note that thefirst controller and the second controller may be provided as one ormore controllers.

The relay device according to the above aspect may be provided asincluding (i) a plurality of ports that include a common port connectedwith a terminal and two ring ports each connected with one of aplurality of communication lines forming a first network being aring-shaped network; (ii) a bus interface connected with a communicationbus different from the plurality of communication lines, thecommunication bus connecting the plurality of relay devices to eachother to form a second network; and (iii) one or more controllers. Theone or more controllers may function as the above-described abnormalitydetection module, the redundant transmission module, and theabnormal-time transfer module.

Further, an individual module in each controller or an individualcontroller may be configured by (i) a central processing unit (CPU)along with memory storing instructions executed by the CPU or (ii)hardware circuitry with no CPU, or (iii) a combination of the CPU alongwith memory and the hardware circuitry.

Thus, a relay device according to the above aspect of the presentdisclosure is used as each of the relay devices in the communicationsystem. The relay device includes an abnormality detection module whichdetects an abnormal communication line among the several communicationlines included in the ring-shaped network. Further, the relay deviceincludes a redundant transmission module as a part that functions whenthe relay device is on the transmission side. In addition, the relaydevice includes an abnormal-time transfer module as a part thatfunctions when the relay device is on the reception side.

To put another way, the redundant transmission module and theabnormal-time transfer module will be described on the assumption that(i) an abnormal communication line is detected by the abnormalitydetection module in a first relay device and a second relay device, and(ii) the frame fA-B destined for the terminal B connected to the commonport in the second relay device is transmitted from the terminal Aconnected to the common port in the first relay device. Note that, asdescribed above, each of the first relay device and the second relaydevice corresponds to the relay device according to the aspect of thepresent disclosure.

In the first relay device, under the state where an abnormalcommunication line is detected by the abnormality detection module, whenthe terminal A transmits the frame fA-B, the redundant transmissionmodule operates. This is because the first relay device receives theframe fA-B from the common port as a relay target frame that is a framewhose destination is a terminal connected to the common port of anotherrelay device (i.e., different relay device).

The redundant transmission module in the first relay device isconfigured to transmit the frame fA-B as a relay target frame via either(i) one of the two ring ports in the first relay device that allows aframe to reach a destination relay device without passing through anabnormal communication line, or (ii) both the two ring ports in thefirst relay device. The destination relay device is another relay device(i.e., different relay device) to which the destination terminal of therelay target frame is connected. In this aspect, the destination relaydevice is the second relay device. Further, the redundant transmissionmodule transmits the frame fA-B to the destination relay device via thecommunication bus.

Then, the frame fA-B passes through the communication path that does notpass through the abnormal communication line in the ring-shaped networkbetween the first relay device and the second relay device. The framefA-B reaches one of the ring ports in the second relay device, and alsoreaches the second relay device via the communication bus.

The abnormal-time transfer module thereby operates in the second relaydevice. This is because the second relay device detects an abnormalcommunication line by the abnormality detection module, and receives aframe (i.e., frame fA-B) which is destined for a terminal connected tothe common port of the second relay device, via one of the ring ports inthe second relay device.

In the second relay device, the abnormal-time transfer module receivesthe frame fA-B transmitted to the communication bus by the redundanttransmission module in the first relay device, and performs adetermination process (i.e., execute a match determination) to determinewhether or not the frame fA-B received via one of the ring ports matchesthe frame fA-B received via the communication bus.

In response to making an affirmative determination by the determinationprocess (i.e., in response to the match determination beingaffirmative), the abnormal-time transfer module transmits the framefA-B, which is received via one of the ring ports, to the destinationterminal (i.e., the terminal B) of the frame via the common port. Inaddition, in response to making a negative determination by thedetermination process (i.e., in response to the match determinationbeing not affirmative), the abnormal-time transfer module discards theframe received via the ring port and the frame received via thecommunication bus without transmitting the frames via the common port.

According to the relay device of the aspect of the present disclosure,even when an abnormality occurs in any of the plurality of communicationlines that connect the plurality of relay devices in a ring shape, arelay target frame can be transmitted via two communication paths or tworoutes. When the two relay target frames transmitted through the twocommunication paths or two routes match each other, the relay targetframe is transmitted to the destination terminal. Therefore, even whenan abnormality occurs in one of the plurality of communication linesconnecting the plurality of relay devices in a ring shape, thereliability of communication can be improved.

Further, the redundant transmission module may determine whether therelay target frame received via the common port indicates a highimportance level. In response to that it is determined that it does notindicate a high importance level, the transmission of the relay targetframe to the communication bus may be disabled (that is, not performed).In addition, the abnormal-time transfer module may determine whether ornot the frame received via one of the ring ports indicates a highimportance level according to the same rule as that of the redundanttransmission module. In response to that it is determined that the framedoes not indicate a high importance level, the abnormal-time transfermodule may abandon both (i) the reception of the relay target frame viathe communication bus and (ii) the performance of the determinationprocess (i.e., match determination), and transmit a frame, which isreceived via one of the ring ports, to a destination terminal of theframe via the common port. In other words, when an abnormality occurs inone of a plurality of communication lines, the transmission of the relaytarget frame using the communication bus may be performed only for aframe indicating a high importance level. Such a configuration caneasily reduce the traffic of the communication bus.

What is claimed is:
 1. A relay device that is one of a plurality of relay devices in a communication system, the relay device comprising: a plurality of ports that include a common port and two ring ports, the common port being connected with a terminal, each of the two ring ports being connected with one of a plurality of communication lines to connect the plurality of relay devices to each other via the plurality of the communication lines to form a ring-shaped network as a first network; a bus interface connected with a communication bus as a second network to connect the plurality of relay devices to each other; an abnormality detection module configured to detect a communication line abnormality state that is a state where an abnormal communication line is detected among the plurality of communication lines included in the ring-shaped network; a redundant transmission module configured to transmit a first relay target frame in response to that the first relay target frame is received via the common port included in the relay device under the communication line abnormality state, the first relay target frame whose destination is a different terminal connected to a different relay device that is different one of the plurality of relay devices via a different common port included in the different relay device, the first relay target frame being transmitted via both of the ring-shaped network and the communication bus, the ring-shaped network using either (i) both of the two ring ports included in the relay device or (ii) one of the two ring ports included in the relay device via which the first relay target frame is enabled to be transmitted up to the different relay device without passing through the abnormal communication line under the communication line abnormality state; and an abnormal-time transfer module configured to receive via the communication bus a second relay target frame whose destination is the terminal connected via the common port included in the relay device on condition that, under the communication line abnormality state, a subject frame that is a frame whose destination is the terminal connected via the common port included in the relay device has been received via one of the two ring ports included in the relay device, execute, upon receiving the second relay target frame, a match determination whether to be affirmative or not affirmative, the match determination being affirmative in response to that the subject frame received via the one of the two ring ports matches the second relay target frame received via the communication bus, transmit the subject frame received via the one of the two ring ports to the terminal connected via the common port in response to the match determination being affirmative, and discard the subject frame received via the one of the two ring ports and the second relay target frame received via the communication bus without transmitting the subject frame and the second relay target frame via the common port in response to the match determination being not affirmative.
 2. The relay device according to claim 1, wherein in response to that the second relay target frame is not received via the communication bus within a fixed time since the subject frame whose destination is the terminal connected via the common port included in the relay device was received via the one of the two ring ports, the abnormal-time transfer module is configured not to transmit the subject frame received via the one of the two ring ports to the terminal connected via the common port.
 3. The relay device according to claim 1, wherein: the redundant transmission module is configured to make a first determination as to whether the first relay target frame received via the common port indicates a high importance level under a first rule; in response to making the first determination that the first relay target frame does not indicate a high importance level, the redundant transmission module is configured not to transmit the first relay target frame via the communication bus; the abnormal-time transfer module is configured to make a second determination as to whether the subject frame received via the one of the two ring ports indicates a high importance level under a second rule that is identical to the first route under which the first determination is made by the redundant transmission module; and in response to making the second determination that the subject frame received via the one of the two ring ports does not indicate a high importance level, the abnormal-time transmission module is configured to transmit the subject frame received via the one of the two ring ports to the terminal connected via the common port while neither (i) receiving the second relay target frame via the communication bus, nor (ii) executing the match determination whether to be affirmative or not affirmative.
 4. A relay device that is one of a plurality of relay devices in a communication system, the relay device comprising: a plurality of ports that include a common port and two ring ports, the common port being connected with a terminal, each of the two ring ports being connected with one of a plurality of communication lines to connect the plurality of relay devices to each other via the plurality of the communication lines to form a ring-shaped network as a first network; a bus interface connected with a communication bus as a second network to connect the plurality of relay devices to each other; and one or more controllers configured to detect a communication line abnormality state that is a state where an abnormal communication line is detected among the plurality of communication lines included in the ring-shaped network, the one or more controllers being further configured to transmit a first relay target frame, whose destination is a different terminal connected to a different relay device that is different one of the plurality of relay devices via a different common port included in the different relay device, via both of (i) the communication bus and (ii) one of the two ring ports bypassing the abnormal communication line, in response to receiving the first relay target frame via the common port under the communication line abnormality state, the one or more controllers being further configured to, determine whether a subject frame and a second relay target frame match each other in response to receiving both of the subject frame via one of the ring ports and the second relay target frame via the communication bus under the communication line abnormality state, each of the subject frame and the second relay target frame being destined for the terminal connected via the common port included in the relay device, transmit the subject frame to the terminal connected via the common port in response to the subject frame and the second relay target frame matching each other, and discard the subject frame and the second relay target frame without transmitting to the terminal connected via the common port in response to the subject frame and the second relay target frame not matching each other.
 5. The relay device according to claim 4, wherein: the one or more controllers are further configured to make a first determination as to whether the first relay target frame received via the common port indicates a high importance level under a first rule; in response to making the first determination that the first relay target frame does not indicate a high importance level, the one or more controllers being further configured not to transmit the first relay target frame via the communication bus; the one or more controllers being further configured to make a second determination as to whether the subject frame received via the one of the two ring ports indicates a high importance level under a second rule that is identical to the first route under which the first determination is made; and in response to making the second determination that the subject frame received via the one of the two ring ports does not indicate a high importance level, the one or more controllers being further configured to transmit the subject frame received via the one of the two ring ports to the terminal connected via the common port while neither (i) receiving the second relay target frame via the communication bus, nor (ii) determining whether the subject frame and the second target frame match each other.
 6. A relay device that is one of a plurality of relay devices in a communication system, the relay device comprising: a plurality of ports that include a common port and two ring ports, the common port being connected with a terminal, each of the two ring ports being connected with one of a plurality of communication lines to connect the plurality of relay devices to each other via the plurality of the communication lines to form a ring-shaped network as a first network; a bus interface connected with a communication bus as a second network to connect the plurality of relay devices to each other; an abnormality detection module configured to detect a communication line abnormality state that is a state where an abnormal communication line is detected among the plurality of communication lines included in the ring-shaped network; a redundant transmission module configured to transmit a first relay target frame in response to that the first relay target frame is received via the common port included in the relay device under the communication line abnormality state, the first relay target frame whose destination is a different terminal connected to a different relay device that is different one of the plurality of relay devices via a different common port included in the different relay device, the first relay target frame being transmitted via both of the ring-shaped network and the communication bus, the ring-shaped network using either (i) both of the two ring ports included in the relay device or (ii) one of the two ring ports included in the relay device via which the first relay target frame is enabled to be transmitted up to the different relay device without passing through the abnormal communication line under the communication line abnormality state; and an abnormal-time transfer module configured to receive via the communication bus a second relay target frame whose destination is the terminal connected via the common port included in the relay device on condition that, under the communication line abnormality state, a subject frame that is a frame whose destination is the terminal connected via the common port included in the relay device has been received via one of the two ring ports included in the relay device, execute, upon receiving the second relay target frame, a match determination whether to be affirmative or not affirmative, the match determination being affirmative in response to that the subject frame received via the one of the two ring ports matches the second relay target frame received via the communication bus, transmit the subject frame received via the one of the two ring ports to the terminal connected via the common port in response to the match determination being affirmative, and discard the subject frame received via the one of the two ring ports and the second relay target frame received via the communication bus without transmitting the subject frame and the second relay target frame via the common port in response to the match determination being not affirmative, wherein: the redundant transmission module is configured to make a first determination as to whether the first relay target frame received via the common port indicates a high importance level under a first rule; in response to making the first determination that the first relay target frame does not indicate a high importance level, the redundant transmission module is configured not to transmit the first relay target frame via the communication bus; the abnormal-time transfer module is configured to make a second determination as to whether the subject frame received via the one of the two ring ports indicates a high importance level under a second rule that is identical to the first route under which the first determination is made by the redundant transmission module; and in response to making the second determination that the subject frame received via the one of the two ring ports does not indicate a high importance level, the abnormal-time transmission module is configured to transmit the subject frame received via the one of the two ring ports to the terminal connected via the common port while neither (i) receiving the second relay target frame via the communication bus, nor (ii) executing the match determination whether to be affirmative or not affirmative. 